import 'package:demo/core/network/bean/response_result_code.dart';

/// 自行扩展对应的状态码对应的exception信息
const Map<int, _ResponseException> responseExceptionMap = {
  ResponseResultCode.TOKEN_EXPIRE: _ResponseException(ResponseResultCode.TOKEN_EXPIRE, 'token失效'),
  ResponseResultCode.OTHER_HTTP_CODE: _ResponseException(ResponseResultCode.OTHER_HTTP_CODE, 'http状态码非200'),
};

/// 响应异常类
class _ResponseException {
  final int status;
  final String msg;

  const _ResponseException(this.status, this.msg);
}
